import { NavigateOptions, To, useLocation, useNavigate } from "react-router-dom"

type N = (to: To, options?: NavigateOptions) => void

// navigation.ts
export let navigate: N

export function setNavigate(n: N) {
    navigate = n
}

export let location: ReturnType<typeof useLocation>

export function setLocation(l: ReturnType<typeof useLocation>) {
    location = l
}
